import request from '@/utils/request'

// 查询老人住院情况列表
export function listHospitalization(query) {
  return request({
    url: '/system/hospitalization/list',
    method: 'get',
    params: query
  })
}

// 查询老人住院情况详细
export function getHospitalization(id) {
  return request({
    url: '/system/hospitalization/' + id,
    method: 'get'
  })
}

// 新增老人住院情况
export function addHospitalization(data) {
  return request({
    url: '/system/hospitalization',
    method: 'post',
    data: data
  })
}

// 修改老人住院情况
export function updateHospitalization(data) {
  return request({
    url: '/system/hospitalization',
    method: 'put',
    data: data
  })
}

// 删除老人住院情况
export function delHospitalization(id) {
  return request({
    url: '/system/hospitalization/' + id,
    method: 'delete'
  })
}
